<template>
  <div>
    <!-- 面包屑导航 -->
    <power-breadcrumb />

    <!-- 卡片视图 -->
    <el-card>
      <!-- 权限列表区域 -->
      <power-rights-list-area :rightsList="rightsList" />
    </el-card>
  </div>
</template>

<script>
import PowerBreadcrumb from './childComps/PowerBreadcrumb.vue'

import { getRightsList } from 'network/rights'
import PowerRightsListArea from './childComps/PowerRightsListArea.vue'
export default {
  components: { PowerBreadcrumb, PowerRightsListArea },
  name: 'Rights',
  data() {
    return {
      rightsList: [],
    }
  },
  created() {
    this.getRightsList()
  },
  methods: {
    async getRightsList() {
      const res = await getRightsList()
      if (res.meta.status !== 200) {
        return this.$message.error('获取权限列表失败!')
      }
      this.rightsList = res.data
      // console.log(this.rightsList)
    },
  },
}
</script>

<style lang="less" scoped>
</style>